﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Workflow.Alerts
{
    public static class WorkflowEnums
    {
        public enum InvoiceFormat
        {
            XLS,
            CSV
        }


        public enum Status
        {
            Created = 0,
            Sent = 1,
            Rejected = 2,
            PartiallyApproved = 3,
            Approved = 4,
            Executed4Municipality = 5,
            Executed4Contractor = 6,
            Accepted = 7,
            Declined = 9,
            Retracted = 10,
            Deleted = 11,
            Invoiced = 12,
            AcceptedPartially = 13
        }

        public static Dictionary<int, string> AlertTypeList
        {
            get
            {
                if (HttpContext.Current.Application[WorkflowConstants.AlertTypes] == null)
                {
                    Utils.Utils.PopulateDictionaries();
                }
                return HttpContext.Current.Application[WorkflowConstants.AlertTypes] as Dictionary<int, string>;
            }
        }

        public static Dictionary<int, string> ActivityTypeList
        {
            get
            {
                if (HttpContext.Current.Application[WorkflowConstants.ActivityTypes] == null)
                {
                    Utils.Utils.PopulateDictionaries();
                }
                return HttpContext.Current.Application[WorkflowConstants.ActivityTypes] as Dictionary<int, string>;
            }
        }

        public static Dictionary<int, string> ConstuctorChoise = new Dictionary<int, string>
        {
        {0,"Herstel in eigen beheer"},
        {1,"Definitief herstel door gemeente"}
            
        };


        public static Dictionary<int, string> MaterialsUnits = new Dictionary<int, string>
        {
            {1,"stuk"},
            {2,"m"},
            {3,"m2"}

        };

        public static string GetMaterialById(string id)
        {
            return MaterialsUnits[Int32.Parse(id)];
        }

        public enum UserType
        {
            Municipality = 1,
            NetworkOperator,
            Contractor
        }
    }
}
